Method for generating video- and audience-specific encoding ladders

ABSTRACT

A method including: extracting a set of video features representing properties of a video segment; generating a set of bitrate-resolution pairs based on the set of video features, each bitrate-resolution pair in the set of bitrate-resolution pairs defining a bitrate and defining a resolution estimated to maximize a quality score characterizing the video segment encoded at the bitrate; accessing a distribution of audience bandwidths; selecting a top bitrate-resolution pair in the set of bitrate-resolution pairs; selecting a bottom bitrate-resolution pair in the set of bitrate-resolution pairs; selecting a subset of bitrate-resolution pairs in the set of bitrate-resolution pairs based on the distribution of audience bandwidths, the subset of bitrate-resolution pairs defining bitrates less than the top bitrate and greater than the bottom bitrate; and generating an encoding ladder for the video segment comprising the top bitrate-resolution pair, the bottom bitrate-resolution pair, and the subset of bitrate-resolution pairs.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is continuation of U.S. patent application Ser. No.17/495,178, filed on 6 Oct. 2021, which is a divisional application ofU.S. patent application Ser. No. 16/820,592, entitled “Method forGenerating Video- and Audience-Specific Encoding Ladders” and filed on16 Mar. 2020, which claims the benefit of U.S. Provisional ApplicationNo. 62/819,277, filed on 15 Mar. 2019, which is incorporated in itsentirety by this reference.

TECHNICAL FIELD

This invention relates generally to the field of video encoding andstreaming and more specifically to a new and useful method forgenerating video specific encoding ladders in the field of videoencoding and streaming.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 is a flowchart representation of a method;

FIG. 2 is a flowchart representation of the method;

FIG. 3 is a flowchart representation of the method; and

FIG. 4 is a conceptual representation of a quality-bitrate-resolutiongraph.

DESCRIPTION OF THE EMBODIMENTS

The following description of embodiments of the invention is notintended to limit the invention to these embodiments but rather toenable a person skilled in the art to make and use this invention.Variations, configurations, implementations, example implementations,and examples described herein are optional and are not exclusive to thevariations, configurations, implementations, example implementations,and examples they describe. The invention described herein can includeany and all permutations of these variations, configurations,implementations, example implementations, and examples.

1. Method

As shown in FIG. 1 , a method S100 includes: extracting a set of videofeatures representing properties of a video segment in Block S110;generating a set of bitrate-resolution pairs based on the set of videofeatures via a convex hull estimation model, each bitrate-resolutionpair in the set of bitrate-resolution pairs defining a bitrate anddefining a resolution estimated to maximize a quality scorecharacterizing the video segment encoded at the bitrate in Block S120;accessing a distribution of audience bandwidths representative of likelyviewers of the video segment in Block S130; selecting a topbitrate-resolution pair in the set of bitrate-resolution pairs, the topbitrate-resolution pair defining a top bitrate in Block S140; selectinga bottom bitrate-resolution pair in the set of bitrate-resolution pairs,the bottom bitrate-resolution pair defining a bottom bitrate in BlockS150; selecting a subset of bitrate-resolution pairs in the set ofbitrate-resolution pairs based on the distribution of audiencebandwidths, the subset of bitrate-resolution pairs defining bitratesless than the top bitrate and greater than the bottom bitrate in BlockS160; and generating an encoding ladder for the video segment includingthe top bitrate-resolution pair, the bottom bitrate-resolution pair, andthe subset of bitrate-resolution pairs in Block S170.

As shown in FIG. 2 , a variation of the method S100 includes: sampling asequence of frames from a video segment in Block S102; extracting a setof video features representing properties of the video segment based onthe sequence of frames, the set of video features including a set ofmotion features, a set of visual complexity features, and a set ofcontent features in Block S112; generating a set of bitrate-resolutionpairs based on the set of video features via a convex hull estimationmodel, each bitrate-resolution pair in the set of bitrate-resolutionpairs defining a bitrate and defining a resolution estimated to maximizea quality score characterizing the video segment encoded at the bitratein Block S120; accessing a distribution of audience bandwidthsrepresentative of likely viewers of the video segment in Block S130;selecting a subset of bitrate-resolution pairs in the set ofbitrate-resolution pairs based on the distribution of audiencebandwidths in Block S160; and generating an encoding ladder for thevideo segment including the subset of bitrate-resolution pairs in BlockS170.

As shown in FIG. 3 , a variation of the method S100 includes: extractinga set of video features representing properties of a video segment inBlock S110; generating a set of bitrate-resolution pairs based on theset of video features via a convex hull estimation model, eachbitrate-resolution pair in the set of bitrate-resolution pairs defininga bitrate and defining a resolution estimated to maximize a qualityscore characterizing the video segment encoded at the bitrate in BlockS120; accessing a distribution of audience bandwidths representative oflikely viewers of the video segment in Block S130; appending successivebitrate-resolution pairs in the set of bitrate resolution pairs to anencoding ladder for the video segment based on a marginalquality-per-cost score of each bitrate-resolution pair in the set ofbitrate-resolution pairs, the marginal quality-per-cost score based onthe distribution of audience bandwidths and a current set ofbitrate-resolution pairs in the encoding ladder in Block S180.

2. Applications

Generally, the method S100 is executed by a computer system (hereinafter“the system”) to generate a video-specific encoding ladder (e.g., amanifest file, such as an HLS manifest) specific to an input video thatimproves video quality (e.g., compared to a fixed bitrate ladder) over arange of bitrates and resolutions based on visual-, motion-, andcontent-related features of the video. Additionally, the system cangenerate the video-specific encoding ladder without performing trialencodes of the input video, thereby enabling fast publishing times ofthe input video as an internet video stream and reducing thecomputational cost of generating the video-specific encoding ladder.Furthermore, the system can generate a video-specific encoding ladderthat includes renditions of the input video that improve viewing qualityover a distribution of audience bandwidths typical of viewers of theinput video. Thus, the system takes in an input video and generates avideo-specific encoding ladder that improves video quality based onfeatures of the video and representative audience data in nearreal-time, enabling sub-ten-second publishing time for internet videostreams with video-specific encoding ladders.

More specifically, the system generates the video-specific encodingladder by: sampling a sequence of frames from an input video; extractinga set of video-level features from the sequence of frames; estimating aset of bitrate-resolution pairs that are predicted to maximize qualityof the input video over a range of bitrates (e.g., 54 bitrate-resolutionpairs between 250 kbps and 10,000 kbps) while controlling for thecomputational costs of the estimation; selecting a top bitrate and/or abottom bitrate from the set of bitrate-resolution pairs; and selecting asubset of the bitrate-resolution pairs between the top bitrate and thebottom bitrate that improve viewing experience across a predicteddistribution of audience bandwidths and bitrates (e.g., a measured orpredicted distribution of bitrates for viewers of the input video).

When sampling frames from an input video, the system can select framesevenly across the duration of the input video. Alternatively, the systemcan intelligently sample frames from the input video that are morerepresentative of the visual and content characteristics of the video inorder to improve the accuracy of subsequent feature extraction (e.g., bysampling from each identified scene in the input video according toscene detection algorithms).

Once the system samples a sequence of frames from the input video, thesystem extracts a set of features based on the sequence of frames. Theset of features can represent the visual complexity of the sequence offrames, the motion characteristics of the video, the content type of thevideo (e.g., sports, games, news, animation) and/or any othercharacteristic of the video. The system can extract features from thesequence of frames by calculating set of complexity and motion metricswhile separately classifying the content type of the video. Additionallyor alternatively, the system can utilize pre-trained machine learningmodels and/or computer vision models to extract a set of spatial ortemporal features from the sequence of frames of the input video.Furthermore, the system can include a video-specific trained featureextraction model in order to extract features that are directly relevantto encoding decisions for the input video.

Upon extracting the set of features for the input video, the systemestimates a set of bitrate-resolution pairs that are predicted tomaximize the viewing quality of an encoding of the input video (i.e. arendition of input video) at the bitrate and resolution specified by thebitrate-resolution pair. In one example, the system can estimate aquality-maximizing resolution for each bitrate in a predeterminedbitrate ladder, wherein the system selects the quality-maximizingresolution for each bitrate from set of discrete resolutions (e.g.,1280×720, 1920×1080, 2560×1440). Furthermore, the system can estimatebitrate-resolution pairs that are predicted to maximize the viewingquality of a video according to a video quality metric, such as peaksignal-to-noise-ratio (hereinafter “PSNR”), structural similarity index(hereinafter “SSIM”), Multiscale SSIM, or video multimethod assessmentfusion (hereinafter “VMAF”). Once estimated by the system, the set ofbitrate-resolution pairs can approximate a “convex hull” of encodingparameters for the input video, wherein any increase in resolution atthe same bitrate or decrease in resolution at the same bitrate does notimprove the viewing quality of the encoded input video.

In one implementation, the system develops a corpus of training examplesand trains a machine learning model (e.g., a long short-term memoryrecurrent artificial neural network) in order to estimate the set ofquality-maximizing bitrate-resolution pairs (i.e. the estimated convexhull) of an input video for a range of bitrates. In this implementation,each training example includes: a set of video-level featurescharacterizing a training video; and a set of bitrate-resolution pairsthat maximize the viewing quality of the training video at each bitrate.The system can then train the machine learning model by executing asupervised learning algorithm for the machine learning model based onthe corpus of training examples.

After estimating a set of bitrate-resolution pairs, the system canselect a top bitrate and/or a bottom bitrate of the video-specificencoding ladder. The system can select a top bitrate by estimating abitrate above which there are diminishing returns in the quality of theencoding of the input video or by determining the bitrate that achievesa targeted visual quality. The system can also select a bottom bitrateby estimating the lowest bitrate encoding of the input video thatachieves a threshold quality or by selecting a bitrate that is supportedby a target percentage of a predicted viewing audience's bandwidthdistribution. In one implementation, the system executes conditionallogic based on the set of bitrate-resolution pairs of the input video toselect the top bitrate and/or the bottom bitrate for the input video'svideo-specific encoding ladder. Alternatively, the system trains asecond machine learning model (e.g., a boosted tree model) to select thetop bitrate and/or the bottom bitrate. The second machine learning modeltakes in the set of bitrate-resolution pairs and outputs the top bitrateand/or bottom bitrate for the video-specific encoding ladder.

Upon selecting the top bitrate and/or bottom bitrate, the system canthen select additional bitrate-resolution pairs characterized bybitrates below the top bitrate and/or above the bottom bitrate based onvideo audience data. The system can select any number ofbitrate-resolution pairs depending on the number of renditions desiredfor the video-specific encoding ladder for the input video. In oneimplementation, the system can access a set of audience data indicatinga distribution of bandwidths, which enables the system to identify therenditions that are viewable to a population of viewers (e.g., apopulation of viewers of a type of video similar to the input video, ageneral population of internet streaming viewers) and select a subset ofbitrate-resolution pairs for inclusion in the video-specific encodingladder from the set of bitrate-resolution pairs based on thedistribution of viewer bandwidths indicated by the audience data.Alternatively, the system can select a subset of bitrate-resolutionpairs for the video-specific encoding ladder that evenly span a range ofbitrates between the top bitrate and the bottom bitrate in the set ofbitrate-resolution pairs.

In another implementation, the system can iteratively calculate amarginal quality-per-cost score for each of the bitrate-resolution pairsin the convex hull, where the marginal quality-per-cost score representsan aggregate improvement in viewing quality over the audience bandwidthdistribution due to the addition of the bitrate-resolution pair to theencoding ladder in proportion to the marginal cost (e.g., encoding cost,storage cost, and/or distribution cost) of adding the bitrate-resolutionpair to the encoding ladder for the input video. Upon calculating amarginal quality-per-cost score for each bitrate-resolution pair in theconvex hull, the system can select the bitrate-resolution pair from theconvex hull that is characterized by a maximum marginal quality-per-costscore assuming that value is greater than a threshold marginalquality-per-cost score.

Once the system generates a video-specific encoding ladder for thevideo, the system can encode separate renditions of the input video atthe bitrate and resolution specified by each bitrate-resolution pairincluded in the video-specific encoding ladder. The system can thenpublish an internet video stream (e.g., by generating an HLS manifestfile specifying available renditions of the input video) with avideo-specific encoding ladder for an input video that is predicted tomaximize quality at any of the bitrates included in the video-specificencoding ladder without performing additional encodes to determine thequality of the video at various bitrates and resolutions.

The term “input video,” as used herein, refers to a video of any lengthor a video segment within a longer video. For example, the system cansegment a full-length video into multiple video segments and treat eachvideo segment as a separate input video.

The term “rendition,” as used herein, refers to an encoding of a videoaccording to a particular bitrate-resolution pair or the particularbitrate-resolution pair itself depending on context.

The term “encoding ladder,” as used herein, refers to set one or morerenditions that can be encoded and streamed based the available bitratefor the internet video stream. Thus, the stream plays back the highestbitrate rendition that is less than the viewer's available bandwidth.

3. Frame Sampling

Generally, in Block S102, the system samples a sequence of frames fromthe input video that represent the visual, motion, and contentcharacteristics of the input video. More specifically, the system canaccess or receive a video file of the input video in an uncompressed orhigh definition format from which individual frames can be reconstructedand extracted without significant encoding artifacts or blur. However,the system can access or receive an input video in any format. Thesystem can select particular frames from the input video to extractfeatures of the input video for analysis and to generate thevideo-specific encoding ladder for the input video.

In one implementation, the system samples the sequence of frames fromthe input video at a predetermined sampling interval within the video(e.g., one frame for every second of the input video) up to a maximumnumber of frames (e.g., 100 frames). The system can calculate thesampling interval for sampling frames from the input video such that thesystem samples up to the maximum number of frames from the input video.Alternatively, the system can sample frames at a predefined samplinginterval and stop sampling upon reaching the maximum number of frames.

In another implementation, the system identifies groups-of-pictures(hereinafter “GOPs”) in the original encoding of the input video andextracts at least one frame from each GOP or samples the GOPs (e.g., theI frame of each GOP) up to a maximum number of frames. Morespecifically, the system can identify a set of GOPs in the videosegment; and sample the I-frame from each group-of-pictures in the videosegment.

Alternatively, the system can execute a scene detection algorithm on theinput video to detect scenes within the input video and extract a set ofsample frames from each scene. Additionally, after detecting each scenein the input video, the system can cluster similar scenes and extract aset of sample frames from each cluster of scenes. Furthermore, inresponse to detecting scenes greater than a threshold duration in theinput video, the system can segment the input video into multiple inputvideo segments and execute Blocks of the method S100 on each input videosegment.

In yet another implementation, the system can detect variability inimage complexity of an input video and adjust the number and/ordistribution of samples according to the variability of the input video.In one example, the system measures variability by calculating the imagecomplexity of a first sample of frames within the video and measuringthe variability (i.e. variance or standard deviation) in the imagecomplexity of the first sample of frames. If the variability is high(e.g., above a threshold variance), the system can increase the maximumnumber of sample frames extracted from the input video. Alternatively,the system can respond to high variance in image complexity acrossframes by subsequently performing scene detection to ensure that thesystem extracts frames from each scene within the input video.

Additionally or alternatively, the system can extract metadata from theinput video and correlate the metadata with the variability of thevideo. For example, the system can access a tag associated with an inputvideo indicating that the video is a conference call and estimate thatthe video is characterized by low variability. After estimating thevariability of the input video based on metadata, the system can extractsample frames from the input video according to the estimatedvariability of the input video.

The system can also sample a sequence of frames for each type of featureextracted by the system for input into the convex hull estimation model.For example, the system can: extract single frames distributed evenly inthe input video in order to calculate visual complexity features andcontent features for the input video; and extract a set of consecutiveseries of frames from the input video in order to calculate motionfeatures for the input video. Thus, the system can sample sequences offrames from the input video that best represent the input video for thepurpose of various metrics and/or models.

4. Feature Extraction

Generally, in Block S110, the system extracts a set of video featuresrepresenting properties of a video segment. More specifically, thesystem can extract features representative of the visual complexity,motion, content, and/or any other characteristic of the input videobased on a number of visual complexity, motion, and/or content specificmetrics and/or models. Thus, the system can generate a video-levelfeature vector that acts as a representation of the input video. Thesystem can then input this representation of the input video into theconvex hull estimation model in order to estimate a set ofbitrate-resolution pairs that are estimated to maximize the quality ofthe input video at each given bitrate without performing any trialencodes of the input video.

In order to generate a set of visual complexity features for thevideo-level feature vector of the input video, the system: calculates avisual complexity metric (e.g., Shannon entropy or peak signal-to-noiseratio) for each frame in the sequence of frames; and calculates acentral tendency statistic (e.g., mean, harmonic mean, median) and/or avariance measure of this visual complexity metric to generate a visualcomplexity feature in a video-level feature vector. The system canexecute these steps for each of a set of visual complexity metrics toobtain multiple visual complexity features in the video-level featurevector.

In another implementation, the system can also extract a set of motionfeatures for inclusion in the video-level feature vector. The systemcan: calculate a set of motion metrics characterizing the motion inconsecutive (or adjacent) frames of the sequence of frames; andcalculate a central tendency statistic and/or a variance measure of thismotion metric to generate a motion feature in the video-level featurevector. Alternatively, the system can extract motion features directlyfrom the input video (e.g., without sampling specific frames of thevideo). Thus, upon calculating a set of motion metrics for eachconsecutive set of frames in the sequence of frames, the system canmerge these motion metrics into a set of motion features representativeof the input video.

The system can also calculate a set of content features for inclusion inthe video-level feature vector. In one implementation, the system can:separately classify each frame in the sampled sequence of frames into apredetermined set of content categories (e.g., sports, games, news).Thus, the system can then generate a content classification for eachframe in the sampled sequence of frames. Alternatively, the system caninput each frame of the sampled sequence of frames into a visual featuremodel such as a convolutional neural network for image classification(hereinafter “image classification model”) such as a convolutionalneural network characterized by the INCEPTION architecture (i.e. aneural network architecture characterized by multiple convolutionfilters operating at the same layer of the network). The system canutilize the image classification model to generate a frame-level featurevector for each frame, where each frame-level feature vector representsthe classifiable visual features of the frame. In one example, thesystem extracts an intermediate layer activation (e.g., a layerimmediately prior to the classification layer) from the imageclassification model as the frame-level feature vector for each frame.Thus, the system can extract a set of content features with more contextregarding the content of the image than a singular classification ofeach frame.

Once the system obtains a set of frame-level content features (i.e. asingle classification or a vector of frame-level features) for eachframe in the sampling sequence of frames, the system can then merge theframe-level content features for each frame into a set of contentfeatures in the video-level feature vector, where these content featuresrepresent the content of the entire sequence of frames and, therefore,the whole input video. For example, the system can execute principlecomponent analysis or any other dimensionality reduction technique onthe set of frame-level feature vectors to obtain a set of contentfeatures for the sequence of frames.

The system can input the merged frame-level feature vectors into ataxonomic video classification model, such as a taxonomic videoclassification model trained on the YT8M dataset, to obtain a set ofcontent features representative of the input video. In one example, thesystem can extract the set of content features from an intermediatelayer (e.g., a layer immediately prior to the classification layer) ofthe taxonomic video classification model.

Thus, the system can extract a video-level feature vector for the inputvideo including a set of visual complexity features, a set of motionfeatures, and a set of content features. In particular, the system canextract a set of video features representing properties of the videosegment based on the sequence of frames, the set of video featuresincluding a set of motion features, a set of visual complexity features,and a set of content features in Block S112. More specifically, thesystem can: calculate the set of motion features based on consecutiveframes in the sequence of frames; for each frame in the sequence offrames, calculate a set of frame-level visual complexity features forthe frame; merge the set of frame-level visual complexity features intothe set of video-level visual complexity features; execute a videoclassification model on the sequence of frames; and extract anintermediate layer activation of the video classification model, togenerate the set of content features.

5. Convex Hull Estimation

The system can estimate a convex hull of an input video that includes aset of bitrate-resolution pairs, where each bitrate-resolution pairdefines the highest quality resolution at a given bitrate according to aparticular quality metric and when viewed in a particular viewingcondition. Alternatively, the system can estimate a convex hullaccording to a quality metric that is agnostic to the viewing conditionof the video, such as peak signal-to-noise ratio (PSNR), structuralsimilarity index (SSIM), and video multimethod assessment fusion for1080p (VMAF1080p), Thus, each resolution in a bitrate-resolution pairincluding the convex hull is the “quality-maximizing” resolution forthat bitrate given the unique characteristics of that video.Consequently, for a given bitrate, encoding the input video at a lowerresolution may increase blur in the input video relative to theresolution included in the convex hull of the input video, and encodingthe video at a higher resolution may increase the prevalence of encodingartifacts in the input video relative to the resolution included in theconvex hull of the input video. Depending on the unique aspects of aparticular input video, the shape of the convex hull for this inputvideo (i.e. the values of the bitrate-resolution pairs in the convexhull) may differ. For example, a convex hull of a first input video mayindicate that the quality maximizing resolution given a bitrate of onemegabit-per-second is 720p, while a convex hull of a second input videomay indicate that the quality maximizing resolution given the samebitrate is 1080p. Typically, the convex hull of an input video may becalculated using a “brute force” process that includes: executing aseries of trial encodings of the input video at various bitrates andresolutions; evaluating the viewing quality of each of these encodings(e.g., according to a quality metric); and identifying the highestquality resolution for each trial bitrate. However, this process isexpensive in processor time and storage requirements. Instead, thesystem can estimate the convex hull of an input video without performingany trial encodes of the input video, thereby reducing the expense ofcalculating the convex hull for an input video.

In Block S120, the system inputs the video-level feature vectorextracted from the input video into a convex hull estimation model, suchas a long short-term memory recurrent artificial neural network(hereinafter “LSTM”), to estimate a set of bitrate-resolution pairs thatdefine an estimated convex hull for the input video. More specifically,the system can generate a set of bitrate-resolution pairs based on theset of video-level features via a convex hull estimation model, eachbitrate-resolution pair in the set of bitrate-resolution pairs defininga bitrate and defining a resolution estimated to maximize a qualityscore characterizing the video segment encoded at the bitrate of thebitrate-resolution pair. Thus, the system can generate a convex hulldescribing the relationship between resolution and quality over a rangeof bitrates specific to a particular input video within the evaluationtime of an artificial neural network (e.g., 500 milliseconds) or othermachine learning model instead of executing a series of trail encodingsof the input video.

In one implementation, the system can generate an estimated convex hullfor an input video via the convex hull estimation model, where theestimated convex hull also predicts an estimated quality (according to aquality metric) of the input video when encoded according to eachbitrate-resolution pair. For example, the system can generate anestimated convex hull for an input video that specifies that the qualitymaximizing resolution for the input video at one megabit-per-second isestimated to be 720p and the quality of the input video when encoded atthe bitrate of one megabit-per-second and at the resolution of 720p isestimated to be a quality score of 85, as measured by VMAF. Therefore,by also estimating the quality of the input video at eachbitrate-resolution pair in the estimated convex hull, the system canmore effectively select, for the video-specific encoding ladder of theinput video, bitrate-resolution pairs from the estimated convex hull ofan input video that result in the largest improvements in viewingquality for a given audience of the input video.

However, in order to ensure that the convex hull estimation modeloutputs an accurate convex hull (e.g., a convex hull that actuallyrepresents the quality maximizing resolution for the input video over aseries of bitrates), the system or another computer system incooperation with the system, can train the convex hull estimation modelaccording to the process described below.

The system can also execute multiple convex hull estimation models,where each convex hull estimation model outputs estimated convex hullsthat indicate quality-maximizing resolutions for the input video whenencoded over a range of bitrates and viewed in a particular viewingcondition. For example, the system can train a separate convex hullestimation model for a 4 K television viewing condition, a 1080ptelevision viewing condition, for a mobile viewing condition, and/or fora laptop viewing condition. Therefore, when executing subsequent Blocksof the method S100, the system can access audience viewing conditiondata and better select bitrate-resolution pairs for a video-specificencoding ladder of the input video that improve the viewing quality forthe most viewers across multiple different viewing conditions.

5.1. Training

The system (or a related training system coordinating with the system)can train the convex hull estimation model (e.g., a machine learningmodel such as an LSTM) based on a corpus of training examples accordingto a training process. More specifically, the system can: access a setof training video segments. Then, for each training video segment in theset of training video segments, the system can: extract a set oftraining video features representing properties of the training videosegment; generate a training feature vector for the training videosegment based on the set of training video features; encode a set oftrial encodes of the training video segment; calculate a quality scoreof each trial encode in the set of trial encodes according to a qualitymetric to generate a set of quality scores; identify a convex hull ofthe training video segment based on the set of trial encodes and the setof quality scores of the set of trial encodes, the convex hull includinga subset of trial encodes in the set of trial encodes that arecharacterized by a maximum quality score at each encoding bitrate in theset of trial encodes; and generate a training example including thetraining feature vector and the convex hull of the training videosegment. The system can then: compile each training example into a setof training examples; and train the convex hull estimation model basedon the set of training examples.

Thus, in order to train the convex hull estimation model, the system canaccess a set of training videos; identify the convex hull of eachtraining video according to a quality metric; extract a set ofvideo-level features for each training video thereby generating a corpusof training examples, wherein each training example includes a set ofvideo level features and a convex hull of a training video; and executea supervised learning algorithm utilizing the corpus of trainingexamples and the convex hull estimation model.

However, the system can apply other learning algorithms to the convexhull estimation model in order to provide accurate and computationallyinexpensive estimates of the convex hull of an input video such asunsupervised, adversarial, and/or reinforcement learning algorithms.

5.1.1 Datasets

Generally, when accessing a set of training videos, the system canaccess a set of training videos that are representative of desired inputvideos. Users of the system may curate a specific set of training videosto effectively bias or improve the convex hull estimation of the convexhull estimation model for a specific category of input video. Thus, thesystem can train separate convex hull estimation models, wherein eachconvex hull estimation model is based on a specific curated set oftraining videos. For example, the system can train a convex hullestimation model for sports videos by accessing a set of sports-relatedtraining videos. Additionally, the system can evaluate the set oftraining videos against additional (e.g., multiple) sets of qualitymetrics such that the system can train separate convex hull estimationmodels for different use cases where different quality metrics may bemore relevant (i.e. mobile device viewing versus television screenviewing). Furthermore, the system can evaluate the set of trainingvideos according to quality metrics optimized for different viewingconditions in order to train a convex hull estimation model for eachsupported viewing condition in a set of supported viewing conditions.

5.1.2 Convex Hull Identification

Upon accessing the set of training videos, the system can calculate theconvex hull, as shown in FIG. 4 , for each of the set of training videosaccording to a quality metric, such as via a series of trial encodingsin a trial encoding process. When calculating the convex hull for eachtraining video the system can calculate the convex hull according to anyquality metric or a consensus of multiple quality metrics, such as meansquare error (MSE), PSNR, SSIM, Multiscale SSIM (MS-SSIM), or videomultimethod assessment fusion (VMAF). The system can calculate thequality metric according to a subset of frames from a rendition of atraining video. In one example, the system evaluates the quality metricfor each frame of the rendition of the training video. In anotherexample, the system evaluates the quality metric for sample sequence offrames from the training video. The system can then calculate a centraltendency statistic, such as the mean, geometric mean, or harmonic mean,to calculate a value indicating to overall quality of the rendition ofthe training video. Additionally or alternatively, the system can removeoutliers and/or otherwise precondition the distribution of qualityvalues across frames of the rendition of the training video beforecalculating a value of the quality metric for the rendition of thetraining video.

To initiate calculation of a convex hull of a training video, the systemcan encode an initial rendition of the training video at a low bitrateas a first step in the trial encoding process (e.g., 200 kbps and 180p).The system can then evaluate the quality of the rendition according tothe quality metric. Subsequently, the system can increase the bitrateand/or resolution and again evaluate the rendition according to thequality metric. The system can repeat this process until the systemevaluates a rendition with a quality metric higher than thresholdquality (e.g., a VMAF score of 90).

Alternatively, to initiate calculation of a convex hull of a trainingvideo, the system can encode an initial rendition of the training videoat a high bitrate and a high resolution as a first step in the trialencoding process. For example, the system can encode an initialrendition at a bitrate greater than 99% of internet streaming viewers ora highest supported bitrate of the system (e.g., 8,000 kbps, 14,000kbps). Correspondingly, the system can encode the initial rendition at ahighest supported resolution such as 4 K or 1080p resolution. Once thesystem has encoded the initial rendition of the training video, thesystem calculates the quality of the rendition according to apredetermined quality metric or consensus of quality metrics.

Upon evaluating the quality of the initial rendition according to thechosen quality metric and storing the quality of the initial rendition,the system selects a bitrate for second and third trial renditions. Thebitrate of the second and third trial renditions can be selected as apercentage decrement of the maximum bitrate or as a predetermined oradjustable bitrate decrement. Once the system has selected a bitrate forthe second trial rendition and third trial renditions, the system canencode the second rendition at the maximum supported resolution and atthe selected bitrate and can also encode the third trial rendition atthe selected bitrate and at a first resolution below the maximumsupported resolution in a supported set of discrete resolutions. Forexample, if the system encodes at a maximum supported resolution of 4 Kand a second highest supported resolution of the system is 1080p thesystem can encode the second rendition at the decremented bitrate and 4K resolution and the third resolution at the decremented bitrate and1080p resolution. After encoding the second and third renditions of thetraining video, the system can then calculate a quality metric for eachof the second rendition and the third rendition and can select thequality-maximizing resolution for inclusion in the convex hull of thetraining video at the selected bitrate. The system can continuedecrementing the selected bitrate for encoding trial renditions orstepping down a predetermined bitrate ladder to test adjacent discreteresolutions over a range of bitrates (e.g., from 10,000 kbps to 250kbps). In one implementation, the system encodes renditions of thetraining video at bitrates corresponding to a predetermined bitrateladder (e.g., a 54-bitrate ladder) and selects the quality-maximizingresolution for inclusion in the convex hull of the training video ateach bitrate in the predetermined bitrate ladder. Additionally oralternatively, the system can interpolate between data points in theconvex hull of the training video to fully characterize the encodingspace of the training video. Furthermore, the system can execute asearch algorithm (e.g., binary search) to calculate a more precisebitrate (e.g., bitrates between the bitrates of the predeterminedbitrate ladder) at which the quality-maximizing resolution transitionsbetween adjacent discrete resolutions.

In one implementation, the system can store the quality metriccalculated for each rendition of the training video that is identifiedas being part of the convex hull of the training video. Thus, in thisimplementation, the system can train the convex hull estimation model toadditionally estimate the quality of each bitrate-resolution pair in anestimated convex hull of an input video.

In another implementation, the system can perform multiple iterations ofthis convex hull identification process for each of a set of viewingconditions by changing (for each iteration of the convex hullidentification process) the quality metrics calculated for eachrendition of the training videos to a quality metric that specificallycharacterizes the quality of the rendition for a particular viewingcondition in the set of viewing conditions. Thus, the system can trainseparate convex hull estimation models for each viewing condition in apredetermined set of viewing conditions by training each model on a setof training examples particular to each viewing condition.

The system can also calculate the convex hull of a training video viatrial encodings according to any other algorithm in order tosufficiently characterize the encoding space for the training video.

To complete a training example based on a training video from the set oftraining videos, the system can extract a set of video-level featuresfrom the training video according to the above described featureextraction process. Once the system extracts a vector of video-levelfeatures from the training video, the system has generated a trainingexample including an example input (the video-level features) and anexample output (the convex hull including a set of quality-maximizingbitrate-resolution pairs). Therefore, the system can generate a corpusof training examples for the convex hull estimation model by executingthe above described steps across a set of training videos. Once thesystem has generated a corpus of training examples, the system canexecute a back-propagation algorithm or other supervised learningalgorithm to train the convex hull estimation model according to thecorpus of training examples.

5.2 Convex Hull Estimation Model

Once the system has trained a convex hull estimation model (or a set ofconvex hull estimation models) according to the aforementioned trainingprocess, the system can access the trained version of the convex hullestimation model while executing Block S120 in order to estimate a setof bitrate-resolution pairs approximating the quality-maximizing convexhull of an input video without performing the aforementioned trialencoding process to fully characterize the encoding space of the inputvideo. More specifically, the system can: generate a feature vector forthe video segment based on the set of video features; and execute theconvex hull estimation model (e.g., an artificial neural network) on thefeature vector to generate a set of quality-maximizingbitrate-resolution pairs.

Thus, the system executes the convex hull estimation model on a set ofvideo-level features for an input video and the convex hull estimationmodel outputs, substantially in real time (e.g., within 500 ms), anestimate of the convex hull of the input video in the form of a set ofbitrate-resolution pairs. Each bitrate-resolution pair of the estimatedconvex hull for the input video estimates the quality-maximizingresolution corresponding to a particular bitrate of thebitrate-resolution pair.

In one implementation, the system evaluates a convex hull estimationmodel on an input video that outputs a set of 54 bitrate-resolutionpairs that span an encoding space between 10,000 kbps and 250 kbps, asthe convex hull of the input video. However, the system can evaluate aconvex hull estimation model that outputs any number ofbitrate-resolution pairs over any range of bitrates. Furthermore, thesystem can evaluate a convex hull estimation model that outputs anadaptable number of bitrate-resolution pairs across an adaptable range,wherein both the number of bitrates and the range of bitrates aredependent on the video-level feature vector of the input video.

In another implementation, the system can evaluate the convex hullestimation model on an input video to output a set of bitrate-resolutionpairs and predict, for each bitrate-resolution pair, the quality scoreof the input video encoded according to the bitrate resolution pair.More specifically, the system can: generate a set of bitrate-resolutionpairs based on a set of video features of the input video via the convexhull estimation model, each bitrate-resolution pair in the set ofbitrate-resolution pairs: defining a bitrate; defining a resolutionestimated to maximize a quality score characterizing the video segmentencoded at the bitrate; and defining the quality score of a rendition ofthe video segment corresponding to the bitrate-resolution pair. Thus,the system can leverage the predicted quality score corresponding toeach bitrate-resolution pair to inform the bitrate-resolution pairselection process described in further detail below in order to select asubset of the bitrate-resolution pairs for the video-specific encodingladder that most improve the aggregate quality of the input video whenviewed by the predicted audience of the video.

In another implementation, the system can evaluate a set of convex hullestimation models for each viewing condition in a predicted set ofaudience viewing conditions. More specifically, the system can: for eachviewing condition in a set of viewing conditions, generate aviewing-condition-specific set of bitrate-resolution pairs based on theset of video features via a convex hull estimation model correspondingto the viewing condition; compile each viewing-condition specific set ofbitrate-resolution pairs into the set of bitrate-resolution pairs; foreach viewing condition in the set of viewing conditions, access aviewing-condition-specific distribution of audience bandwidthsrepresentative of likely viewers of the video segment satisfying theviewing condition; compile each viewing-condition-specific distributionof audience bandwidths into a set of distributions of audiencebandwidths; and append successive bitrate-resolution pairs in the set ofbitrate resolution pairs to the encoding ladder for the video segmentbased on a marginal quality-per-cost score of each bitrate-resolutionpair in the set of bitrate-resolution pairs, the marginalquality-per-cost score based on the set of distributions of audiencebandwidths and the current set of bitrate-resolution pairs in theencoding ladder. Thus, instead of selecting bitrate-resolution pairs forthe video-specific encoding ladder for the input video from a singleestimated convex hull of the input video, the system can selectbitrate-resolution pairs from any of the estimated convex hullscorresponding to the various viewing conditions in the predictedaudience of the input video. Therefore, based on the predicted audiencedistribution across these viewing conditions and the predicted and/orrepresentative bandwidth distribution of the audience satisfying eachviewing condition, the system can better select bitrate-resolution pairsthat maximize quality for the particular audience of the input video.

6. Audience Data Access

Generally, as shown in FIGS. 1, 2, and 3 , the system can access adistribution of audience bandwidths representative of likely viewers ofthe video segment in Block S130. More specifically, the system can:access historical audience data for a set of similar videos and/orcurrently available audience data for the input video itself and predicta distribution of audience bandwidths representing likely viewers of theinput video. Thus, the system can estimate the effect of eachbitrate-resolution pair included in the estimated convex hull of theinput video on the aggregate viewing quality for viewers of the inputvideo by multiplying the quality score corresponding to eachbitrate-resolution pair by the number of viewers in a segment of thedistribution of audience bandwidths that are predicted to view thebitrate-resolution pair.

In order to access an audience bandwidth distribution that isrepresentative of an audience of the input video, the system, or anothersystem cooperating with the system, can record the bandwidth of eachviewer of historical videos streamed by the system. More specifically,for each viewer of a previous internet video stream, the system canrecord the bandwidth of the viewer's connection with the streamingserver for the duration of the viewer's viewing time of the internetstream and average this bandwidth to obtain one value representing theviewers average bandwidth for the stream.

Before selecting a set of bitrate-resolution pairs for thevideo-specific encoding ladder of the input video, the system accesses aset of audience data in the form of a distribution of audiencebandwidths and resolutions from a set of videos representing the inputvideo. In one implementation, the system retrieves audience data ofsimilar length, similar content classification, and similar video-levelfeatures. Alternatively, the system can retrieve audience data fromvideos published by the same publisher of the input video. The systemretrieves viewing data that can include a set of audience bandwidths,resolutions, and/or viewing conditions. For example, an individual datapoint in the audience data can include a single audience member'sviewing bitrate and conditions such as 1400 kbps at 72 op on a mobiledevice. In one implementation, the system can retrieve a compressedrepresentation of the audience data such as a set of distributions ofaudience bandwidths, each distribution corresponding to a particularviewing condition in a set of viewing conditions. Additionally oralternatively, the system can retrieve a single distributionrepresenting the audience bandwidths at all viewing conditions.

Once the system has recorded bandwidth data for a set of previousinternet streams, the system can calculate a weighted averagedistribution for the input video based on audience bandwidthdistribution for a selected set of previous videos. In oneimplementation, the system can select similar videos to the input videobased on the publisher of the input video. For example, the system canselect previous videos from the same publisher and calculate theweighted average distribution from the audience data of these videos. Inanother example, the system can: generate a video-level feature vectorfor the set of historical videos; calculate a similarity index betweenthe input video and each historical video in the set of historicalvideos; select a subset of the historical videos, in response to thesimilarity index of each historical video in the subset of historicalvideos exceeding a threshold similarity index; and calculate a weightedaverage distribution based on audience bandwidth distributions of theselected subset of historical videos. However, the system can identify aset of similar videos to the input video and calculate a weightedaverage audience bandwidth distribution based on this set of similarvideos in any other way.

In one implementation, the system can also estimate, based on deviceaudience data from historical internet stream of historical video, theviewing condition of each viewer of these historical videos, and recordmultiple audience bandwidth distributions for each historical videocorresponding to each viewing condition. Thus, the system can access anaudience bandwidth distribution for each viewing condition supported bythe system and better estimate changes in viewing quality over multipleviewing conditions when accounting for the likely viewers of the inputvideo. Alternatively, the system can access a separate audience viewingcondition distribution indicating the proportion of viewers estimated tosatisfy each viewing condition.

In another implementation, the system can also record and/or accesshistorical geographic viewer data in order to estimate an audiencegeographic distribution for the input video. Thus the system can betterpredict the distribution costs of the input video based on the predictedlocations of viewers of the input video.

7. Top Rendition Selection

In one variation, in Block S140, the system selects a topbitrate-resolution pair (i.e. highest bitrate-resolution pair, maximumbitrate-resolution pair) for the video-specific encoding ladder from theset of bitrate-resolution pairs (e.g., a highest quality rendition ofthe video for the video-specific encoding ladder), where the topbitrate-resolution pair. More specifically, the system selects a topbitrate-resolution pair from the estimated convex hull of an input videothat, when the input video is encoded according to the topbitrate-resolution pair, the quality of that rendition is greater than athreshold quality within a confidence interval.

In order to estimate the top bitrate-resolution pair for thevideo-specific encoding ladder in the convex hull of the input video,the system (or a related system coordinating with the system) can traina machine learning model (e.g., a boosted tree model) that takes in aconvex hull estimate for an input video and outputs a topbitrate-resolution pair (hereinafter the “top rendition model”). The toprendition model can be trained on the same or similar set of trainingvideos as the convex hull estimation model, however, when preparing acorpus of training examples for the top rendition model, the system canfurther calculate a top bitrate-resolution pair in the fullycharacterized encoding space of the training video. The system cancalculate the top bitrate-resolution pair based on conditional logic,such as by calculating the partial derivative of bitrate with respect toquality of the convex hull of the training video and identifying abitrate at which the derivative falls below a threshold value.Alternatively, the system can select a lowest bitrate on the convex hullof the training video that corresponds to a quality above a thresholdquality. The system can therefore train the top rendition modelaccording to a supervised learning algorithm based on a set of trainingexamples, wherein each training example includes the convex hull of atraining video calculated according to the trial encoding process (as aninput) and a top bitrate for the same training video (as an output).

Alternatively, the system can select the top bitrate-resolution pairfrom the set of bitrate-resolution pairs directly via conditional logic.In implementations where the convex hull estimation model outputs aquality score for each bitrate-resolution pair in the estimated convexhull of the input video, the system can: identify, in the set ofbitrate-resolution pairs, a set of high-quality bitrate-resolution pairscharacterized by quality scores greater than a threshold quality score;and select the top bitrate-resolution pair from the set of high-qualitybitrate-resolution pairs, the top bitrate-resolution pair defining thetop bitrate equal to a minimum bitrate from the set of high-qualitybitrate resolution pairs. Thus, the system selects thebitrate-resolution pair characterized by the lowest bitrate that is alsocharacterized by greater than a threshold quality score. For example,the system can select the top bitrate-resolution pair as the lowestbitrate-resolution pair with an estimated quality score greater thanVMAF 94.

In another implementation, the system can select a topbitrate-resolution pair by identifying the point along the estimatedconvex hull of an input video where the quality of the rendition doesnot substantially increase with an increase in bitrate (i.e. there arediminishing returns in quality for increases in bitrate). For example,the system can select a bitrate-resolution pair in the set ofbitrate-resolution pairs at which the derivative of quality with respectto bitrate is less than a threshold for the particular input video.Thus, the system selects the top bitrate-resolution pair in thevideo-specific encoding ladder for the video in order to constrain theencoding space for the input video to bitrates that provide meaningfuldifferences in video quality.

Additionally or alternatively, the system can access audience data forthe training video and select a top bitrate-resolution pair consistentwith a predetermined percentile (e.g., 99%) of audience bandwidths forthe training video. Furthermore, the system can select a topbitrate-resolution pair that is the higher or lower result of theaforementioned calculation methods. Furthermore, the system can select adifferent top bitrate based on the intended audience of the input videoand audience data corresponding to the intended audience. For example,the system can select a top bitrate corresponding to a VMAF score of 88for Canadian users while selecting a top bitrate corresponding to a VMAFscore of 93 for Mexican users. Therefore, the system can train separatetop bitrate models for each potential audience segment of an inputvideo.

Upon accessing a trained version of the top rendition model the systemcan evaluate the top rendition model with the estimated convex hull ofthe input video as input to the top rendition model to estimate a topbitrate-resolution pair for the input video. Once the system estimates atop bitrate-resolution pair for the input video the system can remove(e.g., from consideration for the video-specific encoding ladder for thevideo) bitrate-resolution pairs in the estimated convex hull of theinput video characterized by bitrates above the estimated topbitrate-resolution pair of the input video.

8. Bottom Rendition Selection

In addition to selecting a top bitrate-resolution pair for an inputvideo (i.e. a top rendition for the video-specific encoding ladder forthe input video), in one variation, the system can also select a bottombitrate-resolution pair (i.e. a lowest bitrate-resolution pair, aminimum bitrate-resolution pair) representing a lowest quality renditionof the video in the video-specific encoding ladder for an input video inBlock S150. More specifically, the system can select a bottombitrate-resolution pair for the video-specific encoding ladder from theset of bitrate-resolution pairs, the bottom bitrate-resolution pairdefining a bottom bitrate in the encoding ladder for the input video,where each additional bitrate-resolution pair included in the encodingladder is characterized by a bitrate greater than the bottom bitrate.

In one implementation, the system can train and evaluate a bottomrendition model based on the same or similar set of training videos asthe convex hull estimation model and/or the top rendition model.However, when preparing a set of training examples for the bottomrendition model, the system can calculate, from the fully characterizedencoding space of the training video, a bottom bitrate-resolution pairfor the training video. Additionally or alternatively, the system canaccess audience data for the training video and select a bottom bitrateconsistent with a predetermined percentile (e.g., 1%) of audiencebandwidths for the training video. As described above, the system canalso train separate bottom rendition models based on different minimumacceptable qualities according to variations in the preferences ofvarious audience segments. Furthermore, the system can select a bottombitrate that is the higher or lower result of the aforementionedcalculation methods. The system can identify a lowest bitrate-resolutionpair, along the convex hull of the training video, at which the qualityof the encoded training video at the bitrates is greater than or equalto a minimum threshold quality for the video as the bottom bitrate ofthe training video.

The system can then train the bottom rendition model according to asupervised learning algorithm based on a set of training examples,wherein each training example includes the convex hull of a trainingvideo calculated according to the trial encoding process (as an input)and a bottom bitrate-resolution pair for the same training video (as anoutput).

In implementations where the convex hull estimation model also estimatesa quality score for each bitrate-resolution pair in the estimated convexhull of the input video, the system can execute conditional logic basedon the estimated quality score of each bitrate-rendition pair to selectthe bottom bitrate-resolution pair for the video-specific encodingladder of the input video. More specifically, the system can: identify aset of bitrate-resolution pairs characterized by a quality score greaterthan a threshold quality score; and select the bitrate-resolution pairin the identified set of bitrate-resolution pairs characterized by thelowest bitrate in the identified set of bitrate-resolution pairs.

In another implementation, based on the distribution of audiencebandwidths corresponding to the input video, the system can: identify athreshold percentile in the distribution of audience bandwidths; andselect a first bitrate-resolution pair defining a bitrate greater thanthe threshold percentile as the bottom bitrate-resolution pair. Thus,the system can ensure that a predetermined percentile of likely viewersof the input video will be able to stream the input video.

However, the system can select a bottom bitrate-resolution pair from theestimated convex hull of the input video for inclusion in thevideo-specific encoding ladder of the input video in any other way.

9. Video-Specific Encoding Ladder Selection

Generally, in Block S160, the system can select an encoding ladder forthe input video, including a subset of bitrate-resolution pairs in theset of bitrate resolutions pairs estimated to predicted to yield anaggregate quality score near a maximum possible quality score for thevideo segment based on the distribution of audience bandwidths. Morespecifically, in Block S160 the system can select a particular subset ofbitrate-resolution pairs—in the set of bitrate-resolution pairs—for thevideo-specific encoding ladder based on the distribution of audiencebandwidths. Thus, the system can select a set of bitrate-resolutionpairs (characterized by bitrates between the selected top bitrate andbottom bitrate of the input video) for inclusion in the video-specificencoding ladder for the input video based on audience data for videosrelated to the input video.

The system can select a subset of bitrate-resolution pairs from the setof bitrate-resolution pairs between the top rendition and the bottomrendition along the estimated convex hull of the input video, accordingto a user-defined setting (e.g., the system can offer video-specificencoding ladders with any number of renditions between 3 and 20renditions). Alternatively, the system can estimate a number ofrenditions included in the video-specific encoding ladder from theestimated convex hull of the input video based on audience bandwidthdata and/or audience viewing condition data.

Thus, in implementations where the system selects a bottombitrate-resolution pair and a top bitrate-resolution pair, the systemcan: select the subset of bitrate-resolution pairs in the set ofbitrate-resolution pairs based on the distribution of audiencebandwidths, the subset of bitrate-resolution pairs defining bitratesless than the top bitrate, and/or select the subset ofbitrate-resolution pairs in the set of bitrate-resolution pairs based onthe distribution of audience bandwidths, the subset ofbitrate-resolution pairs defining bitrates greater than the bottombitrate.

In Block S160, the system selects a video-specific encoding ladder forthe input video including a subset of bitrate-resolution pairs (i.e.renditions) in the set of bitrate-resolution pairs estimated to maximizeviewing quality over the distribution of audience bandwidths. Morespecifically, the system can select renditions of the video that thesystem estimates provide highest video quality for the largest number ofaudience members given each audience member's viewing bitrate accordingto the retrieved audience data. Because each bitrate-resolution pairincluded in the convex hull includes the estimated highest qualityresolution for a given bitrate, any audience member that is viewing theinput video at bandwidth equal to a bitrate of a rendition included inthe video-specific encoding ladder is viewing the highest qualityrendition for their bitrate. However, as an audience member's viewingbitrate increases from the bitrate of the rendition before reaching anadjacent rendition in the video-specific encoding ladder, the differencebetween the quality of the rendition and the highest possible qualitygiven the increased bandwidth of the audience member increases. Thus,the system can select renditions for the video-specific encoding ladderof the input video, in order to minimize the difference between audiencebandwidths in the distribution of audience bandwidths and the bitratescorresponding to selected renditions in the video-specific encodingladder of the application.

Alternatively, the system can minimize a function of the differencebetween the audience bandwidths in the distribution of audiencebandwidths and the bitrates of the selected renditions of thevideo-specific encoding ladders. In this implementation, the system canutilize a function describing quality as function of bitrate, whereinthe function is based on an average fit of calculated convex hulls for aset of training videos. Thus, the system can select a subset ofrenditions from the estimated convex hull of the input video thatminimizes the difference between audience bandwidths in a distributionof audience bandwidths and bitrates of the nearest rendition in thevideo-specific encoding ladder with a bitrate less than the audiencebandwidths.

In one variation, the system can execute an iterative selection processby repeatedly selecting individual bitrate-resolution pairs from the setof bitrate-resolution pairs for the video-specific encoding ladder,based on a marginal quality-per-cost score of each bitrate-resolutionpair in the set of bitrate-resolution pairs and based on thebitrate-resolution pairs already included in the video-specific encodingladder. Thus, in each iteration of this iterative selection process, thesystem: scores each bitrate-resolution pair in the set ofbitrate-resolution pairs of the estimated convex hull that have not yetbeen selected for inclusion in the video-specific encoding ladder basedon the cost of generating, maintaining, and distributing a rendition ofthe input video corresponding to each bitrate-resolution pair and theresulting improvement in quality for a predicted distribution ofaudience bandwidths given the set of bitrate-resolution pairs alreadyincluded in the video-specific encoding ladder of the input video.Therefore, during each iteration, the system selects thebitrate-resolution pair in the set of bitrate-resolution pairs that mostimproves the quality of the input video across the predicted set ofviewers of the input video when compared to the status quo encodingladder. This process is described in further detail below.

In another variation, the system can execute Block S160 and select avideo-specific encoding ladder for the input video for each viewingcondition or geographic region indicated by the representative audiencedata for the input video. Alternatively, the system can selectparticular renditions in a single video-specific encoding ladder thataddress particular sections of the audience bitrate distribution acrossviewing conditions or for particular geographic regions. Therefore, thesteps described below with respect to Block S160 can be executed once ormultiple times for the same input video. Thus, the system can evaluatethe relative costs of selecting additional bitrate-resolution pairs fora single encoding ladder or generating a second encoding ladder specificto a separate viewing condition.

9.1 Iterative Bitrate-Resolution Pair Selection

Generally, as shown in FIG. 3 , the system can select successivebitrate-resolution pairs via an iterative selection process in BlockS180. More specifically, the system can append successivebitrate-resolution pairs in the set of bitrate resolution pairs to anencoding ladder for the video segment based on a marginalquality-per-cost score of each bitrate-resolution pair in the set ofbitrate-resolution pairs (calculated based on a predicted quality scoreof the bitrate-resolution pair), the marginal quality-per-cost scorebased on the distribution of audience bandwidths, and a current set ofbitrate-resolution pairs included in the video-specific encoding ladder.Additionally, the system can recalculate the marginal quality-per-costscore for each bitrate-resolution pair in the set of bitrate resolutionpairs during each iteration of this selection process to account forchanges in a predicted aggregate viewing quality of the currentvideo-specific encoding ladder prior to selecting an additionalbitrate-resolution pair for the video-specific encoding ladder. Duringeach iteration of the iterative selection process, the system can alsocompare the set of marginal quality-per-cost scores of the set ofbitrate-resolution pairs to a threshold marginal quality-per-cost scoreand, in response to a marginal quality-per-cost score in the set ofmarginal quality-per-cost scores exceeding the thresholdquality-per-cost score, append a bitrate-resolution pair characterizedby a maximum quality-per-cost score to the video-specific encodingladder for the input video.

In one example, the system can select an additional bitrate-resolutionpair for inclusion in the video-specific encoding ladder in response toa quality improvement-per-cost of the rendition greater than athreshold. In another example, the system can select an additionalbitrate-resolution pair for inclusion in the video-specific encodingladder in response to a quality improvement that is predicted to resultin a positive return-on-investment (e.g., a positive profit margin) whencompared with the cost of producing a rendition of the input videoaccording to the additional bitrate-resolution pair.

In order to calculate the marginal quality-per-cost score for eachbitrate-resolution pair in the set of bitrate-resolution pairs, thesystem can: calculate a rendition cost of the bitrate-resolution pair,which accounts for the encoding cost, the storage cost, and/or thedistribution cost of including the bitrate-resolution pair in thevideo-specific encoding ladder for the input video; calculate a marginalquality score, representing an aggregate improvement in the viewingquality over the predicted distribution of audience bandwidths (i.e. theaudience bandwidth distribution) in response to the addition of thebitrate-resolution pair to the video-specific encoding ladder of theinput video; and divide the marginal quality score by the rendition costto obtain a marginal quality-per-cost score for the bitrate-resolutionpair. More specifically, the system can, for each bitrate-resolutionpair in the set of bitrate-resolution pairs: calculate a rendition costof the bitrate-resolution pair, the rendition cost representing a costof a rendition of the video segment corresponding to thebitrate-resolution pair in Block S182; calculate a marginal qualityscore of the bitrate-resolution pair based on the distribution ofaudience bandwidths and the current set of bitrate-resolution pairs inthe encoding ladder, the marginal quality score representing anaggregate improvement in viewing quality according to the audiencebandwidth distribution in response to an addition of thebitrate-resolution pair to the encoding ladder in Block S184; andcalculate a marginal quality-per-cost score of the bitrate-resolutionpair based on the marginal quality score of the bitrate-resolution-pairand the rendition cost of the bitrate-resolution pair in Block S186.

In one implementation, the system can execute a cost estimation functionthat estimates the cost of encoding, storing, and/or distributing arendition of the input video encoded according to a bitrate-resolutionpair based on audience data (e.g., audience bandwidth distribution,audience geographic distribution, audience viewing conditiondistribution) and based on the bitrate defined by the bitrate-resolutionpair and the resolution defined by the bitrate-resolution pair. Morespecifically, the system can: calculate an encoding cost of a renditioncorresponding to the bitrate-resolution pair; calculate a storage costof the rendition corresponding to the bitrate-resolution pair; calculatea distribution cost of the rendition corresponding to thebitrate-resolution pair; and combine the encoding cost, the storagecosts, and the distribution cost to calculate the rendition cost.

In another implementation, the system can calculate the marginal qualityscore of each remaining bitrate-resolution pair in the set ofbitrate-resolution pairs by multiplying a predicted quality score(according to a particular quality metric) of the bitrate-resolutionpair by a segment (e.g., proportion) of the audience bandwidthdistribution of the input video that is characterized by a bandwidthsufficient to view a rendition of the input video encoded according tothe bitrate and resolution of the bitrate-resolution pair and abandwidth that is not large enough to view a higher bitrate renditionalready present in the encoding ladder. The system can then subtract anaggregate quality score (calculated over the same region of the audiencebandwidth distribution) for an adjacent lower rendition in thevideo-specific encoding ladder to determine a marginal aggregate qualityscore that represents an improvement in aggregate viewing quality causedby the addition of the bitrate-resolution pair to the video-specificencoding ladder. More specifically, the system can, for eachbitrate-resolution pair in the set of bitrate-resolution pairs: identifya lower adjacent bitrate-resolution pair in the encoding ladder relativeto the bitrate-resolution pair; identify a higher adjacentbitrate-resolution pair in the encoding ladder relative to thebitrate-resolution pair; calculate a first predicted quality score ofthe bitrate-resolution pair estimating a viewing quality of a firstrendition of the video segment corresponding to the bitrate-resolutionpair; integrate the first quality score by a bandwidth segment in theaudience bandwidth distribution to generate an improved aggregatequality score, the bandwidth segment extending from a lower bandwidthdefined by the bitrate-resolution pair to a higher bandwidth defined bythe higher adjacent bitrate-resolution pair; calculate a second qualityscore of the lower adjacent bitrate-resolution pair estimating a viewingquality of a second rendition of the video segment corresponding to thelower adjacent bitrate-resolution pair; multiply the second qualityscore by the bandwidth segment in the audience bandwidth distribution togenerate a status quo aggregate quality score; and subtract the statusquo aggregate quality score from the improved aggregate quality score tocalculate the marginal quality score of the bitrate-resolution pair.Thus, the system can precisely predict differences in aggregate viewingquality based on the estimated quality score (e.g., estimated by theconvex hull estimation model) and the audience bandwidth distribution ofthe input video. In one example, the system can also multiply thepredicted quality score of the bitrate-resolution pair by the bandwidthsegment in multiple audience bandwidth distributions, where eachaudience bandwidth distribution represents a predicted audiencecharacterized by a viewing condition in a set of viewing conditions. Thesystem can then device the marginal quality score for eachbitrate-resolution pair by the rendition cost of the bitrate-resolutionpair to obtain a marginal quality-per-cost score for thebitrate-resolution pair.

Once the system has calculated a marginal quality-per-cost score, thesystem can evaluate whether the magnitude of any marginalquality-per-cost score of any bitrate-resolution pair justifies theinclusion of a successive bitrate-resolution pair in the video-specificencoding ladder in Block S188. More specifically, in response to aquality-per-cost score of at least one bitrate-resolution pair in theset of bitrate-resolution pairs exceeding a threshold quality-per-costscore, the system can: select a first successive bitrate-resolution pairin the set of bitrate-resolution pairs, the first successive bitrateresolution pair characterized by a maximum quality-per-cost score;remove the successive bitrate-resolution pair from the set ofbitrate-resolution pairs; and append the successive bitrate-resolutionpair to the encoding ladder. Thus, in each iteration of the iterativeselection process, the system selects a bitrate-resolution pair for thevideo-specific encoding ladder that is characterized by the highestmarginal quality-per-cost score greater than a threshold marginalquality-per-cost score. The system can: continue the iterative selectionprocess until none of the marginal quality-per-cost scorescharacterizing the remaining bitrate-resolution pairs in the set ofbitrate-resolution pairs exceed the threshold quality-per-cost score;and, in response to detecting this condition, publish the video-specificencoding ladder of the input video.

In one implementation, the system can iteratively select abitrate-resolution pair from the set of bitrate-resolution pairs basedon a predicted increase in profit (e.g., from providing the videostreaming services for the input vide) resulting from the addition ofthe bitrate-resolution pair. More specifically, the system can calculatea profit score (e.g., as an alternative for the quality-per-cost score)for each bitrate-resolution pair in the set of bitrate-resolution pairsby: estimating an increase in revenue based on the marginal qualityscore of each bitrate-resolution pair; and subtracting the increase inrevenue by the rendition cost of the bitrate-resolution pair. Thus, byscoring each bitrate-resolution pair based on the estimated increase inprofit resulting from the addition of the bitrate-resolution pair to thevideo-specific encoding ladder, the system can evaluate whether addingeach bitrate-resolution pair to the encoding ladder is monetarilyvaluable.

In order estimate the resulting revenue from the marginal improvement inaggregate viewing quality over the distribution of audience bandwidths,the system can train a profit estimation model to characterize theeffects of increased viewing quality on viewing time for historicalvideos and apply this model to the characteristics of the input videoand the increase in quality predicted by the marginal quality score ofeach bitrate-resolution pair. Alternatively, the system can execute aset of heuristics (e.g., a mathematical function) to estimate theincrease in revenue from the marginal quality score of eachbitrate-resolution pair. In this implementation, the system can set athreshold for selecting a bitrate-resolution pair based on the profitscore of each bitrate resolution pair in the set of bitrate-resolutionpairs at zero such that the system continues selecting profitablebitrate-resolution pairs for the encoding ladder until the cost ofproducing additional renditions of the input video exceeds anyincremental profits.

10. Encoding Ladder Generation

Upon selecting a set of bitrate-resolution pairs for the video-specificencoding ladder of an input video, the system can generate an encodingladder for the video segment including the top bitrate-resolution pair,the bottom bitrate-resolution pair, and/or the subset ofbitrate-resolution pairs in Block S110. More specifically, the systemcan encode a set of renditions of the video segment, each renditionincluding an encoding of the video segment characterized by a bitrateand a resolution of a bitrate-resolution pair in the encoding ladder andpublishing a manifest file representing the encoding ladder for aninternet stream. In one example, the system can encode the input videousing a video codec (e.g., H.264, H.265) and publish the encoding ladderas an HLS manifest file.

In one implementation, the system can record audience data for the inputvideo and, after an initial time interval, the system can removerenditions from the video-specific encoding ladder (in order to improveperformance and/or save server storage space), add renditions to thevideo-specific encoding ladder, and/or execute Blocks of the method S100based on audience data for the input video itself instead of audiencedata for a representative set of other videos similar to the inputvideo. Therefore, the system can periodically update the video-specificencoding ladder in response to changes in the audience data for theinput video.

The systems and methods described herein can be embodied and/orimplemented at least in part as a machine configured to receive acomputer-readable medium storing computer-readable instructions. Theinstructions can be executed by computer-executable componentsintegrated with the application, applet, host, server, network, website,communication service, communication interface,hardware/firmware/software elements of a user computer or mobile device,wristband, smartphone, or any suitable combination thereof. Othersystems and methods of the embodiment can be embodied and/or implementedat least in part as a machine configured to receive a computer-readablemedium storing computer-readable instructions. The instructions can beexecuted by computer-executable components integrated bycomputer-executable components integrated with apparatuses and networksof the type described above. The computer-readable medium can be storedon any suitable computer readable media such as RAMs, ROMs, flashmemory, EEPROMs, optical devices (CD or DVD), hard drives, floppydrives, or any suitable device. The computer-executable component can bea processor but any suitable dedicated hardware device can(alternatively or additionally) execute the instructions.

As a person skilled in the art will recognize from the previous detaileddescription and from the figures and claims, modifications and changescan be made to the embodiments of the invention without departing fromthe scope of this invention as defined in the following claims.

I claim:
 1. A method comprising: extracting a set of video featuresrepresenting properties of a video segment; generating a set ofbitrate-resolution pairs based on the set of video features, eachbitrate-resolution pair in the set of bitrate-resolution pairs: defininga bitrate; and defining a resolution predicted to yield a quality score,approximating a maximum quality score, characterizing the video segmentencoded at the bitrate and the resolution; accessing a distribution ofaudience bandwidths representative of likely viewers of the videosegment; and appending successive bitrate-resolution pairs in the set ofbitrate resolution pairs to an encoding ladder for the video segmentbased on a marginal quality-per-cost score of each bitrate-resolutionpair in the set of bitrate-resolution pairs, the marginalquality-per-cost score based on the distribution of audience bandwidthsand a current set of bitrate-resolution pairs in the encoding ladder. 2.The method of claim 1, wherein appending successive bitrate-resolutionpairs in the set of bitrate resolution pairs to the encoding ladder forthe video segment comprises: for each bitrate-resolution pair in the setof bitrate-resolution pairs: calculating a rendition cost of thebitrate-resolution pair, the rendition cost representing a cost of arendition of the video segment corresponding to the bitrate-resolutionpair; calculating a marginal quality score of the bitrate-resolutionpair based on the distribution of audience bandwidths and the currentset of bitrate-resolution pairs in the encoding ladder, the marginalquality score representing an aggregate improvement in viewing qualityaccording to the audience bandwidth distribution in response to anaddition of the bitrate-resolution pair to the encoding ladder; andcalculating a marginal quality-per-cost score of the bitrate-resolutionpair based on the marginal quality score of the bitrate-resolution-pairand the rendition cost of the bitrate-resolution pair; and in responseto a quality-per-cost score of at least one bitrate-resolution pair inthe set of bitrate-resolution pairs exceeding a thresholdquality-per-cost score: selecting a first successive bitrate-resolutionpair in the set of bitrate-resolution pairs, the first successivebitrate resolution pair characterized by a maximum quality-per-costscore; removing the successive bitrate-resolution pair from the set ofbitrate-resolution pairs; and appending the successivebitrate-resolution pair to the encoding ladder.
 3. The method of claim2, wherein calculating the rendition cost for the bitrateresolution-pair for each bitrate-resolution pair in the set ofbitrate-resolution pairs comprises, for each bitrate-resolution pair inthe set of bitrate-resolution pairs: calculating an encoding cost of arendition corresponding to the bitrate-resolution pair; calculating astorage cost of the rendition corresponding to the bitrate-resolutionpair; calculating a distribution cost of the rendition corresponding tothe bitrate-resolution pair; and combining the encoding cost, thestorage costs, and the distribution cost to calculate the renditioncost.
 4. The method of claim 2, wherein calculating the marginal qualityscore of the bitrate-resolution pair for each bitrate-resolution pair inthe set of bitrate-resolution pairs comprises, for eachbitrate-resolution pair in the set of bitrate-resolution pairs:identifying a lower adjacent bitrate-resolution pair in the encodingladder relative to the bitrate-resolution pair; identifying a higheradjacent bitrate-resolution pair in the encoding ladder relative to thebitrate-resolution pair; calculating a first predicted quality score ofthe bitrate-resolution pair estimating a viewing quality of a firstrendition of the video segment corresponding to the bitrate-resolutionpair; combining the first quality score with a bandwidth segment in theaudience bandwidth distribution to generate an improved aggregatequality score, the bandwidth segment extending from a lower bandwidthdefined by the bitrate-resolution pair to a higher bandwidth defined bythe higher adjacent bitrate-resolution pair; calculating a secondquality score of the lower adjacent bitrate-resolution pair estimating aviewing quality of a second rendition of the video segment correspondingto the lower adjacent bitrate-resolution pair; combining the secondquality score with the bandwidth segment in the audience bandwidthdistribution to generate a status quo aggregate quality score; andsubtracting the status quo aggregate quality score from the improvedaggregate quality score to calculate the marginal quality score of thebitrate-resolution pair.
 5. The method of claim 4, wherein calculatingthe marginal quality-per-cost score of the bitrate-resolution pair basedon the marginal quality score of the bitrate-resolution-pair and therendition cost of the bitrate-resolution pair for eachbitrate-resolution pair in the set of bitrate-resolution pairscomprises, for each bitrate-resolution pair in the set ofbitrate-resolution pairs: estimating an increase in revenue based on themarginal quality score; and dividing the increase in revenue by therendition cost of the bitrate-resolution pair.
 6. The method of claim 2:wherein generating the set of bitrate-resolution pairs based on the setof video features comprises generating the set of bitrate-resolutionpairs based on the set of video features, each bitrate-resolution pairin the set of bitrate-resolution pairs: defining a bitrate; defining aresolution predicted to yield the quality score, approximating a maximumquality score, characterizing the video segment encoded at the bitrateand the resolution; and defining the quality score of a rendition of thevideo segment corresponding to the bitrate-resolution pair; and whereinappending successive bitrate-resolution pairs in the set of bitrateresolution pairs to the encoding ladder comprises appending successivebitrate-resolution pairs in the set of bitrate resolution pairs to theencoding ladder based on the marginal quality-per-cost score of eachbitrate-resolution pair in the set of bitrate-resolution pairs, whereinthe marginal quality-per-cost score based on the distribution ofaudience bandwidths, the current set of bitrate-resolution pairs in theencoding ladder, and the quality score of the bitrate resolution pair.7. The method of claim 2: wherein generating the set ofbitrate-resolution pairs based on the set of video features comprises:for each viewing condition in a set of viewing conditions, generating aviewing-condition-specific set of bitrate-resolution pairs based on theset of video features, each bitrate-resolution pair in theviewing-condition-specific set of bitrate-resolution pairs: defining abitrate; and defining a resolution predicted to yield a quality score,approximating a maximum quality score, characterizing the video segmentencoded at the bitrate and the resolution and viewed according to theviewing condition; and compiling each viewing-condition specific set ofbitrate-resolution pairs into the set of bitrate-resolution pairs;wherein accessing the distribution of audience bandwidths representativeof likely viewers of the video segment comprises: for each viewingcondition in the set of viewing conditions, accessing aviewing-condition-specific distribution of audience bandwidthsrepresentative of likely viewers of the video segment satisfying theviewing condition; and compiling each viewing-condition-specificdistribution of audience bandwidths into a set of distributions ofaudience bandwidths; and wherein appending successive bitrate-resolutionpairs in the set of bitrate resolution pairs to the encoding laddercomprises appending successive bitrate-resolution pairs in the set ofbitrate resolution pairs to the encoding ladder for the video segmentbased on the marginal quality-per-cost score of each bitrate-resolutionpair in the set of bitrate-resolution pairs, the marginalquality-per-cost score based on the set of distributions of audiencebandwidths and the current set of bitrate-resolution pairs in theencoding ladder.
 8. A method comprising: extracting a set of videofeatures representing properties of a video segment; generating a set ofbitrate-resolution pairs based on the set of video features, eachbitrate-resolution pair in the set of bitrate-resolution pairs: defininga bitrate; and defining a resolution predicted to yield a quality score,approximating a maximum quality score, characterizing the video segmentencoded at the bitrate and the resolution; accessing a distribution ofaudience bandwidths representative of likely viewers of the videosegment; and for each bitrate-resolution pair in the set ofbitrate-resolution pairs: calculating a rendition cost of thebitrate-resolution pair, the rendition cost representing a cost of arendition of the video segment corresponding to the bitrate-resolutionpair; calculating a marginal quality score of the bitrate-resolutionpair based on the distribution of audience bandwidths and the currentset of bitrate-resolution pairs in the encoding ladder, the marginalquality score representing an aggregate improvement in viewing qualityaccording to the audience bandwidth distribution in response to anaddition of the bitrate-resolution pair to the encoding ladder; andcalculating a marginal quality-per-cost score of the bitrate-resolutionpair based on the marginal quality score of the bitrate-resolution-pairand the rendition cost of the bitrate-resolution pair; and in responseto a quality-per-cost score of at least one bitrate-resolution pair inthe set of bitrate-resolution pairs exceeding a thresholdquality-per-cost score: selecting a first successive bitrate-resolutionpair in the set of bitrate-resolution pairs, the first successivebitrate resolution pair characterized by a maximum quality-per-costscore; removing the successive bitrate-resolution pair from the set ofbitrate-resolution pairs; and appending the successivebitrate-resolution pair to the encoding ladder.
 9. The method of claim8, wherein calculating the rendition cost for the bitrateresolution-pair for each bitrate-resolution pair in the set ofbitrate-resolution pairs comprises, for each bitrate-resolution pair inthe set of bitrate-resolution pairs: calculating an encoding cost of arendition corresponding to the bitrate-resolution pair; calculating astorage cost of the rendition corresponding to the bitrate-resolutionpair; calculating a distribution cost of the rendition corresponding tothe bitrate-resolution pair; and combining the encoding cost, thestorage costs, and the distribution cost to calculate the renditioncost.
 10. The method of claim 8, wherein calculating the marginalquality score of the bitrate-resolution pair for each bitrate-resolutionpair in the set of bitrate-resolution pairs comprises, for eachbitrate-resolution pair in the set of bitrate-resolution pairs:identifying a lower adjacent bitrate-resolution pair in the encodingladder relative to the bitrate-resolution pair; and identifying a higheradjacent bitrate-resolution pair in the encoding ladder relative to thebitrate-resolution pair.
 11. The method of claim 10, wherein calculatingthe marginal quality score of the bitrate-resolution pair for eachbitrate-resolution pair in the set of bitrate-resolution pairs furthercomprises, for each bitrate-resolution pair in the set ofbitrate-resolution pairs: calculating a first predicted quality score ofthe bitrate-resolution pair estimating a viewing quality of a firstrendition of the video segment corresponding to the bitrate-resolutionpair; and combining the first quality score with a bandwidth segment inthe audience bandwidth distribution to generate an improved aggregatequality score, the bandwidth segment extending from a lower bandwidthdefined by the bitrate-resolution pair to a higher bandwidth defined bythe higher adjacent bitrate-resolution pair.
 12. The method of claim 11,wherein calculating the marginal quality score of the bitrate-resolutionpair for each bitrate-resolution pair in the set of bitrate-resolutionpairs further comprises, for each bitrate-resolution pair in the set ofbitrate-resolution pairs: calculating a second quality score of thelower adjacent bitrate-resolution pair estimating a viewing quality of asecond rendition of the video segment corresponding to the loweradjacent bitrate-resolution pair; combining the second quality scorewith the bandwidth segment in the audience bandwidth distribution togenerate a status quo aggregate quality score; and subtracting thestatus quo aggregate quality score from the improved aggregate qualityscore to calculate the marginal quality score of the bitrate-resolutionpair.
 13. The method of claim 12, wherein calculating the marginalquality-per-cost score of the bitrate-resolution pair based on themarginal quality score of the bitrate-resolution-pair and the renditioncost of the bitrate-resolution pair for each bitrate-resolution pair inthe set of bitrate-resolution pairs comprises, for eachbitrate-resolution pair in the set of bitrate-resolution pairs:estimating an increase in revenue based on the marginal quality score;and dividing the increase in revenue by the rendition cost of thebitrate-resolution pair.
 14. The method of claim 8, wherein generatingthe set of bitrate-resolution pairs based on the set of video featurescomprises generating the set of bitrate-resolution pairs based on theset of video features, each bitrate-resolution pair in the set ofbitrate-resolution pairs: defining a bitrate; defining a resolutionpredicted to yield the quality score, approximating a maximum qualityscore, characterizing the video segment encoded at the bitrate and theresolution; and defining the quality score of a rendition of the videosegment corresponding to the bitrate-resolution pair.
 15. The method ofclaim 14, wherein appending successive bitrate-resolution pairs in theset of bitrate resolution pairs to the encoding ladder comprisesappending successive bitrate-resolution pairs in the set of bitrateresolution pairs to the encoding ladder based on the marginalquality-per-cost score of each bitrate-resolution pair in the set ofbitrate-resolution pairs, the marginal quality-per-cost score based onthe distribution of audience bandwidths, the current set ofbitrate-resolution pairs in the encoding ladder, and the quality scoreof the bitrate resolution pair.
 16. The method of claim 8, whereingenerating the set of bitrate-resolution pairs based on the set of videofeatures comprises: for each viewing condition in a set of viewingconditions, generating a viewing-condition-specific set ofbitrate-resolution pairs based on the set of video features, eachbitrate-resolution pair in the viewing-condition-specific set ofbitrate-resolution pairs: defining a bitrate; and defining a resolutionpredicted to yield a quality score, approximating a maximum qualityscore, characterizing the video segment encoded at the bitrate and theresolution and viewed according to the viewing condition; and compilingeach viewing-condition specific set of bitrate-resolution pairs into theset of bitrate-resolution pairs
 17. The method of claim, whereinaccessing the distribution of audience bandwidths representative oflikely viewers of the video segment comprises: for each viewingcondition in the set of viewing conditions, accessing aviewing-condition-specific distribution of audience bandwidthsrepresentative of likely viewers of the video segment satisfying theviewing condition; and compiling each viewing-condition-specificdistribution of audience bandwidths into a set of distributions ofaudience bandwidths.
 18. The method of claim 8, wherein appendingsuccessive bitrate-resolution pairs in the set of bitrate resolutionpairs to the encoding ladder comprises appending successivebitrate-resolution pairs in the set of bitrate resolution pairs to theencoding ladder for the video segment based on the marginalquality-per-cost score of each bitrate-resolution pair in the set ofbitrate-resolution pairs, the marginal quality-per-cost score based onthe set of distributions of audience bandwidths and the current set ofbitrate-resolution pairs in the encoding ladder.
 19. A methodcomprising: extracting a set of video features representing propertiesof a video segment; generating a set of bitrate-resolution pairs basedon the set of video features; accessing a distribution of audiencebandwidths representative of likely viewers of the video segment; andfor each bitrate-resolution pair in the set of bitrate-resolution pairs:calculating an encoding cost of a rendition corresponding to thebitrate-resolution pair; calculating a storage cost of the renditioncorresponding to the bitrate-resolution pair; calculating a distributioncost of the rendition corresponding to the bitrate-resolution pair; andcombining the encoding cost, the storage costs, and the distributioncost to calculate the rendition cost.
 20. The method of claim 19,further comprising: calculating a marginal quality score of thebitrate-resolution pair based on the distribution of audience bandwidthsand the current set of bitrate-resolution pairs in the encoding ladder,the marginal quality score representing an aggregate improvement inviewing quality according to the audience bandwidth distribution inresponse to an addition of the bitrate-resolution pair to the encodingladder; and calculating a marginal quality-per-cost score of thebitrate-resolution pair based on the marginal quality score of thebitrate-resolution-pair and the rendition cost of the bitrate-resolutionpair.